home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-13 | 536 b | 25 lines | [TEXT/CWIE] |
- module: Example
- author: Patrick C. Beard <beard@cs.ucdavis.edu>
- description: A simple Dylan example.
-
- // first, define the local module.
-
- define module Example
- use Dylan; // all programs need this.
- use Extensions; // imports "main"
- use Cheap-IO; // for "print"
- use Beep; // imports "beep"
- use Stack; // imports <stack>.
- end module Example;
-
- // the main entry point.
-
- define method main (argv0, #rest args)
- let s = make(<stack>);
- push(s, "Me!");
- push(s, "Eat!");
- print(pop(s));
- print(pop(s));
- beep();
- end;
-